package helper;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JOptionPane;

public abstract class AbstractAction implements ActionListener {

	@Override
	public void actionPerformed(ActionEvent aEvent) {
		try {
			execute(aEvent);
		} catch (Exception e) {
		    e.printStackTrace();
			JOptionPane.showMessageDialog(null, e.getMessage());
		}
	}

	protected abstract void execute(ActionEvent aEvent) throws Exception;
}
